﻿// YamlDeclarations.cs
//
// Copyright 2008 by Burt Harris
// Licensed under the Microsoft Public License (Ms-PL)
// See: http://www.codeplex.com/yaml/license
//


using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.Package;

namespace YaTools.Yaml.LanguagePackage
{
    internal class YamlDeclarations : Declarations
    {
        private readonly List<String> _declarations = new List<string>();

        internal void Add(string name)
        {
            _declarations.Add(name);
        }

        public override int GetCount()
        {
            return _declarations.Count;
        }

        public override string GetDescription(int index)
        {
            return string.Empty;
        }

        public override string GetDisplayText(int index)
        {
            return _declarations[index];
        }

        public override int GetGlyph(int index)
        {
            return 0;
        }

        public override string GetName(int index)
        {
            return _declarations[index];
        }
    }
}